package com.yu.websocket.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Auther: ole
 * @Date: 2021/3/1 0001 12:17
 * @Description:
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    /**
     * 为各个页面提供路径映射
     * @param registry
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/chat").setViewName("chat");
    }
}